package AbstractFactoryMethodPattern.FactoryMethodExample.cpu;

import AbstractFactoryMethodPattern.FactoryMethodExample.framework.Factory;
import AbstractFactoryMethodPattern.FactoryMethodExample.framework.Product;

public class CpuFactory extends Factory {
    @Override
    public Product createProduct(String type) {
        Product p = null;
        switch (type) {
            case "A10":
                p = new AppleCpu("A10");
                break;
            case "A11":
                p = new AppleCpu("A11");
                break;
            case "X820":
                p = new QualcommCpu("X820");
                break;
            case "X860":
                p = new QualcommCpu("X860");
                break;
            default:
                p = null;
        }
        return p;
    }

    @Override
    public void registerProduct(Product product) {

    }
}
